import { ZCC_TYPE } from "../../../typings/types/common";
import { Litigation } from "../../../typings/types/litigation";
import { http, request } from "../../../utils/request";
// 次债务人线索列表
export function getDwListApi(params: any) {
  return request({
    url: "/clue/getDwList",
    method: "GET",
    data: params,
  });
}
// 次债务人/年份数量统计
export function getDwYearCountListApi(params: any) {
  return request({
    url: "/clue/getDwYearCountList",
    method: "GET",
    data: params,
  });
}
// 次债务人线索详情
export function getDwDetailApi(params: any) {
  return request({
    url: "/clue/getDwDetail",
    method: "GET",
    data: params,
  });
}
/** 裁判文书详情 */
export function getWsDetailApi(params: any) {
  return request({
    url: "/clue/getWsDetail",
    method: "GET",
    data: params
  });
}
// 司法涉诉信息列表
export function getSxListApi(params: any) {
  return request({
    url: "/clue/getSxList",
    method: "GET",
    data: params,
  });
}
// 涉诉信息下拉框-最小案由
export function getSxListDropdownApi(params: any) {
  return request({
    url: "/clue/SxList/dropDown",
    method: "GET",
    data: params,
  });
}
// 涉诉年份数量统计
export function getSxYearCountListApi(params: any) {
  return request({
    url: "/stat/getSxYearCountList",
    method: "GET",
    data: params,
  });
}
/** 司法涉诉详情 */
export function getSxDetailApi(params: any) {
  return request({
    url: "/clue/getSxDetail",
    method: "GET",
    data: params,
  });
}
/** 股权质权 */
export function getEquityPledgeDetailApi(params: any) {
  return request({
    url: "/operationalRisk/getEquityPledgeDetail",
    method: "GET",
    data: params,
  });
}
/** 债务人子公司 */
export function getinvestDetailAPI(params: any) {
  return request({
    url: "/business/investDetail",
    method: "GET",
    data: params,
  });
}
/** 股东未实缴线索详情、一人制线索详情 */
export function getpartnerDetailAPI(params: any) {
  return request({
    url: "/business/partnerDetail",
    method: "GET",
    data: params,
  });
}
/** 土地抵押详情 */
export function getLandMortgageDetailAPI(params: any) {
  return request({
    url: "/operationalRisk/getLandMortgageDetail",
    method: "GET",
    data: params,
  });
}
/** 商标详情 */
export function getTrademarkDetailAPI(params: any) {
  return request({
    url: "/intellectualProperty/getTrademarkDetail",
    method: "GET",
    data: params,
  });
}
/** 专利详情 */
export function getPatentDetailAPI(params: any) {
  return request({
    url: "/intellectualProperty/getPatentDetail",
    method: "GET",
    data: params,
  });
}
/** 企业排污详情 */
export function getPollutantPermitDetailApi(params: any) {
  return request({
    url: "/information/PollutantPermitDetail",
    method: "GET",
    data: params,
  });
}
/** 土地拍卖详情 */
export function getLandaucPartyDetailApi(params: any) {
  return request({
    url: "/operationalRisk/getLandaucPartyDetail",
    method: "GET",
    data: params,
  });
}
/** 动产抵押详情 */
export function getOperationMpledgeDetailAPI(params: any) {
  return request({
    url: "/operationalRisk/getOperationMpledgeDetail",
    method: "GET",
    data: params,
  });
}
/** 招投标详情 */
export function getBidDetailApi(params: any) {
  return request({
    url: "/information/getBidDetail",
    method: "GET",
    data: params,
  });
}
// 破产重整分页列表
export function judicialInvolvementApi(params: any) {
  return request({
    url: "/judicialInvolvement/reorganizationPage",
    method: "get",
    data: params,
  });
}
// 失信执行人信息列表
export function getZxListApi(params: any) {
  return request({
    url: "/clue/getZxList",
    method: "GET",
    data: params,
  });
}
// 失信执行人信息详情
export function getZxDetailApi(params: any) {
  return request({
    url: "/clue/getZxDetail",
    method: "GET",
    data: params,
  });
}
// 限制高消费列表
/** 限制高消费列表 */
export function getLimitHighconsumePageApi(params: any) {
  return request({
    url: "/judicialInvolvement/getLimitHighconsumePage",
    method: "GET",
    data: params,
  });
}
/** 限制高消费详情 */
export function getLimitHighconsumeDetailApi(params: any) {
  return request({
    url: "/judicialInvolvement/getLimitHighconsumeDetail",
    method: "GET",
    data: params,
  });
}
// 限制高消费 案由下拉列表
export function getLimitHighconsumeDropDownApi(params: any) {
  return request({
    url: "/judicialInvolvement/LimitHighconsume/dropDown",
    method: "GET",
    data: params,
  });
}

/** 开庭公告详情 */
export function getOpenCourtNoticeDetailApi(id: string) {
  return http<Litigation.OpenCourtNoticeDetail>({
    url: "/judicialInvolvement/getOpenAnnouncementDetail",
    method: "GET",
    data: { id: id },
  });
}

/** 开庭公告列表 */
export function getOpenCourtNoticeApi(params: any) {
  const data = {
    ...params,
    perPage: 10,
  };
  return http<ZCC_TYPE.ListResult<Litigation.OpenCourtNoticeDetail>>({
    url: "/judicialInvolvement/getOpenAnnouncementList",
    method: "GET",
    data: data,
  });
}

/** 法院公告详情 */
export function getCourtNoticeDetailApi(id: string) {
  return http<Litigation.CourtNoticeDetail>({
    url: "/judicialInvolvement/getCourtAnnouncementDetail",
    method: "GET",
    data: { id: id },
  });
}

/** 法院公告列表 */
export function getCourtNoticeApi(params: any) {
  const data = {
    ...params,
    perPage: 10,
  };
  return http<ZCC_TYPE.ListResult<Litigation.CourtNoticeDetail>>({
    url: "/judicialInvolvement/getCourtAnnouncementList",
    method: "GET",
    data: data,
  });
}

/** 立案详情 */
export function getRegisterDetailApi(id: string) {
  return http<Litigation.RegisterDetail>({
    url: "/judicialInvolvement/getRegisterDetail",
    method: "GET",
    data: { registerId: id },
  });
}

/** 立案列表 */
export function getRegisterApi(params: any) {
  const data = {
    ...params,
    perPage: 10,
  };
  return http<ZCC_TYPE.ListResult<Litigation.RegisterDetail>>({
    url: "/judicialInvolvement/getRegisterPage",
    method: "GET",
    data: data,
  });
}

/** 终本详情 */
export function getFinalCaseDetailApi(id: string) {
  return http<Litigation.FinalCaseDetail>({
    url: "/judicialInvolvement/getFinalCaseDetail",
    method: "GET",
    data: { id: id },
  });
}

/** 终本列表 */
export function getFinalCaseApi(params: any) {
  const data = {
    ...params,
    perPage: 10,
  };
  return http<ZCC_TYPE.ListResult<Litigation.FinalCaseDetail>>({
    url: "/judicialInvolvement/getFinalCasePage",
    method: "GET",
    data: data,
  });
}

/** 冻结 */
export function getEquityFreezeApi(params: any) {
  const data = {
    ...params,
    perPage: 10,
  };
  return http<ZCC_TYPE.ListResult<Litigation.EquityFreeze>>({
    url: "/judicialInvolvement/getEquityFreezePage",
    method: "GET",
    data: data,
  });
}

export function getEquityFreezeDropdownApi(params: any) {
  const data = {
    companyId: params,
  };
  return http<Litigation.EquityFreezeDropdownList>({
    url: "/judicialInvolvement/EquityFreeze/dropDown",
    method: "GET",
    data: data,
  });
}

/** 解除冻结 */
export function getAssistanceUnfreezeApi(params: any) {
  const data = {
    ...params,
    perPage: 10,
  };
  return http<ZCC_TYPE.ListResult<Litigation.AssistanceUnfreeze>>({
    url: "/judicialInvolvement/getAssistanceUnfreezePage",
    method: "GET",
    data: data,
  });
}

export function getAssistanceUnfreezeDropdownApi(params: any) {
  const data = {
    companyId: params,
  };
  return http<Litigation.AssistanceUnfreezeDropdownList>({
    url: "/judicialInvolvement/AssistanceUnfreeze/dropDown",
    method: "GET",
    data: data,
  });
}

/** 司法拍卖 */
export function getJudicialAuctionApi(params: any) {
  const data = {
    ...params,
    perPage: 10,
  };
  return http<ZCC_TYPE.ListResult<Litigation.JudicialAuction>>({
    url: "/judicialInvolvement/getAuctionList",
    method: "GET",
    data: data,
  });
}
// 涉诉统计基础数据
export function getSxStatBaseInfoAPI(params: any) {
  return request({
    url: "/stat/getSxStatBaseInfo",
    method: "GET",
    data: params
  })
}
// 涉诉案件金额统计
export function getSxStatAmountListAPI(params: any) {
  return request({
    url: "/stat/getSxStatAmountList",
    method: "GET",
    data: params
  })
}
// 涉诉案件数量统计
export function getSxStatCountListAPI(params: any) {
  return request({
    url: "/stat/getSxStatCountList",
    method: "GET",
    data: params
  })
}
// 涉诉案件趋势统计/诉讼地位
export function getSxStatYearListAPI(params: any) {
  return request({
    url: "/stat/getSxStatYearList",
    method: "GET",
    data: params
  })
}
// 涉诉案件状态统计
export function getSxStatStatusListAPI(params: any) {
  return request({
    url: "/stat/getSxStatStatusList",
    method: "GET",
    data: params
  })
}
// 涉诉案由类型统计
export function getSxStatAyListAPI(params: any) {
  return request({
    url: "/stat/getSxStatAyList",
    method: "GET",
    data: params
  })
}
// 最小案由TO10统计
export function getSxLaayTreeAPI(params: any) {
  return request({
    url: "/clue/getSxLaayTree",
    method: "GET",
    data: params
  })
}

// 涉诉涉案地区统计
export function getSxStatAreaListAPI(params: any) {
  return request({
    url: "/stat/getSxStatAreaList",
    method: "GET",
    data: params
  })
}
